<template>
	<view @click="emit('click')" :style="style"><slot></slot></view>
</template>

<script setup>
import { computed, reactive } from 'vue';
const props = defineProps({
	custom: Object
});

const defaultStyle = {
	color: '#29bb9b',
	fontSize: '20rpx',
	padding: '3rpx 15rpx',
	borderRadius: '5rpx',
	display: 'inline-flex'
};

const style = computed(() => ({
	...defaultStyle,
	...props.custom,
	backgroundColor: (props.custom && props.custom.color ? props.custom.color : defaultStyle.color) + '30'
}));

const emit = defineEmits(['click']);
</script>

<style lang="scss"></style>
